package a.f.g.a;

import a.c.e;
import a.c.m;
import a.c.v;
import a.c.w;
import a.f.c.h;

public class q
  extends o
{
  public static int c;
  
  public void a(d paramd)
  {
    super.a(paramd);
    paramd.d(false);
    b_ localb_ = new b_();
    paramd.i(localb_.b());
    paramd.f(localb_.a());
    paramd.c(localb_.e());
    paramd.a(new ob(new e_(), ob.b, 0.0D, 200.0D));
    paramd.a(new ob(localb_.d(), ob.b, 0.0D, 200.0D));
  }
  
  nc b()
  {
    return new d_();
  }
  
  nc c()
  {
    return new c_();
  }
  
  public void a(int paramInt)
  {
    ((c_)this.b.f()).a(paramInt);
  }
  
  public void c(int paramInt)
  {
    ((d_)this.a.f()).a(paramInt);
  }
  
  public int n()
  {
    return ((c_)this.b.f()).a();
  }
  
  public int o()
  {
    return ((d_)this.a.f()).a();
  }
  
  static final class d_
    implements nc
  {
    private int b = 1;
    private int c = 1;
    private double d = 1.0D;
    
    public int a()
    {
      return this.b;
    }
    
    public void a(int paramInt)
    {
      this.b = paramInt;
    }
    
    public int b()
    {
      return this.c;
    }
    
    public void b(int paramInt)
    {
      this.c = paramInt;
    }
    
    public double c()
    {
      return this.d;
    }
    
    public void a(double paramDouble)
    {
      this.d = paramDouble;
    }
    
    public y a(cb paramcb, bb parambb, f paramf)
    {
      boolean bool = xb.r;
      int j = xb.q;
      e locale1 = paramcb.p();
      y localy = paramcb.a();
      cb localcb1 = paramcb.r();
      paramf.a();
      m localm = locale1.l();
      label195:
      label226:
      label494:
      do
      {
        if (!localm.e()) {
          break;
        }
        a.c.d locald = localm.a();
        e locale2 = locald.a(locale1);
        if (locale2 != locale1)
        {
          lb locallb = parambb.d();
          cb localcb2 = locallb.a(locale2);
          double d1 = locallb.a(locald).b();
          int i = this.b;
          cb localcb3 = localcb2.r();
          if (localcb1 != localcb3)
          {
            break label195;
            d1 *= this.d;
            i = this.c;
            if (bool) {}
          }
          double d2;
          double d3;
          double d4;
          double d5;
          do
          {
            if (!paramcb.q())
            {
              if (bool) {
                break label271;
              }
              if (!localcb2.q()) {}
            }
            else
            {
              localObject = localcb2.r();
              do
              {
                if (localObject == null) {
                  break label226;
                }
                if (j != 0) {
                  break;
                }
                if (localObject == paramcb) {
                  break label494;
                }
                localObject = ((cb)localObject).r();
              } while (j == 0);
              if (bool) {
                break;
              }
              localObject = localcb1;
              do
              {
                if (localObject == null) {
                  break label269;
                }
                if (j != 0) {
                  break;
                }
                if (localObject == localcb2) {
                  break label494;
                }
                localObject = ((cb)localObject).r();
              } while (j == 0);
            }
            Object localObject = localcb2.a();
            d2 = ((y)localObject).d() - localy.d();
            d3 = ((y)localObject).f() - localy.f();
            d4 = ((y)localObject).g() - localy.g();
            d5 = Math.sqrt(d2 * d2 + d3 * d3 + d4 * d4);
          } while (bool);
          if ((bool) || (d5 >= 0.001D))
          {
            if (!bool) {
              if (d1 == 0.0D) {
                d1 = 0.001D;
              }
            }
            switch (i)
            {
            case 1: 
              d6 = 1.0D / d1;
              if (!bool) {
                if (j == 0) {
                  break label473;
                }
              }
            case 2: 
              if (!bool)
              {
                d6 = d5 / (d1 * d1);
                if (j == 0) {
                  break label473;
                }
              }
              break;
            }
            double d6 = k.a(d5 / d1, this.b) / d5;
            paramf.a(d2 * d6, d3 * d6, d4 * d6);
          }
        }
        localm.f();
      } while (j == 0);
      label269:
      label271:
      label473:
      return paramf;
    }
  }
  
  static final class c_
    implements nc
  {
    private int b = 2;
    
    public int a()
    {
      return this.b;
    }
    
    public void a(int paramInt)
    {
      this.b = paramInt;
    }
    
    public y a(cb paramcb, bb parambb, f paramf)
    {
      boolean bool = xb.r;
      int i = xb.q;
      e locale1 = paramcb.p();
      y localy = paramcb.a();
      lb locallb = parambb.d();
      double d1 = paramcb.l();
      w localw = locallb.m().v();
      label275:
      label292:
      label295:
      label297:
      do
      {
        if (!localw.e()) {
          break;
        }
        e locale2 = localw.d();
        if (locale2 != locale1)
        {
          cb localcb = locallb.a(locale2);
          if ((bool) || (!localcb.v()))
          {
            Object localObject;
            if (!bool) {
              if (paramcb.q())
              {
                localObject = localcb.r();
                do
                {
                  if (localObject == null) {
                    break;
                  }
                  if (i != 0) {
                    break label275;
                  }
                  if (localObject == paramcb) {
                    break label544;
                  }
                  localObject = ((cb)localObject).r();
                } while (i == 0);
                if (bool) {
                  break label297;
                }
                if (bool) {
                  break label292;
                }
                if (!localcb.q()) {
                  break label295;
                }
                localObject = paramcb.r();
                do
                {
                  if (bool) {
                    break label297;
                  }
                  if (localObject == null) {
                    break label295;
                  }
                  if (i != 0) {
                    break;
                  }
                  if (bool) {
                    break label275;
                  }
                  if (localObject == localcb) {
                    break label544;
                  }
                  localObject = ((cb)localObject).r();
                } while (i == 0);
              }
            }
            double d2;
            double d3;
            double d4;
            double d5;
            do
            {
              if (localcb.q())
              {
                if (bool) {
                  break label297;
                }
                localObject = paramcb.r();
                do
                {
                  if (localObject == null) {
                    break label295;
                  }
                  if (i != 0) {
                    break;
                  }
                  if (localObject == localcb) {
                    break label544;
                  }
                  localObject = ((cb)localObject).r();
                } while (i == 0);
              }
              localObject = localcb.a();
              d2 = localy.d() - ((y)localObject).d();
              d3 = localy.f() - ((y)localObject).f();
              d4 = localy.g() - ((y)localObject).g();
              d5 = Math.sqrt(d2 * d2 + d3 * d3 + d4 * d4);
              if (bool) {
                break label404;
              }
            } while (bool);
            if (d5 != 0.0D)
            {
              double d6 = localcb.l();
              double d7 = Math.max(d5 - (d1 + d6), 0.001D);
              double d8 = parambb.i();
              switch (this.b)
              {
              case 1: 
                d9 = d8 / (d7 * d5);
                if (!bool) {
                  if (i == 0) {
                    break label523;
                  }
                }
              case 2: 
                if (!bool)
                {
                  d9 = d8 * d8 / (d7 * d7 * d5);
                  if (i == 0) {
                    break label523;
                  }
                }
                break;
              }
              double d9 = k.a(d8 / d7, this.b) / d5;
              paramf.a(d2 * d9, d3 * d9, d4 * d9);
            }
          }
        }
        localw.f();
      } while (i == 0);
      label404:
      label544:
      return paramf;
    }
  }
  
  static final class e_
    implements nc
  {
    public y a(cb paramcb, bb parambb, f paramf)
    {
      boolean bool = xb.r;
      int j = xb.q;
      cb localcb = paramcb.r();
      if (((bool) || (localcb != null)) && ((bool) || (!localcb.v())))
      {
        y localy1 = paramcb.a();
        y localy2 = localcb.a();
        double d1 = localy2.d() - localy1.d();
        double d2 = localy2.f() - localy1.f();
        double d3 = localy2.g() - localy1.g();
        double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);
        double d5 = d4 - localcb.m() * 0.5D;
        if (!bool) {
          if (d5 < 0.001D) {
            return paramf;
          }
        }
        double d6 = localcb.m() * 0.5D;
        int i = 1;
        if (!bool) {
          if (d6 == 0.0D) {
            d6 = 0.001D;
          }
        }
        double d7;
        switch (i)
        {
        case 1: 
          d7 = d5 / (d6 * d4);
          if (!bool) {
            if (j == 0) {
              break;
            }
          }
          break;
        case 2: 
          d7 = d5 * d5 / (d6 * d6 * d4);
          if (!bool) {
            if (j == 0) {
              break;
            }
          }
          break;
        default: 
          d7 = k.a(d5 / d6, i) / d4;
        }
        if ((bool) || (localcb.l() > localcb.m())) {
          d7 *= Math.sqrt(localcb.l() / localcb.m());
        }
        paramf.b(d1 * d7, d2 * d7, d3 * d7);
      }
      return paramf;
    }
  }
  
  static final class b_
  {
    h a;
    a.c.bb b;
    bc c = new c_();
    bc d = new d_();
    nc f = new a_();
    
    public bc a()
    {
      return this.c;
    }
    
    public bc b()
    {
      return this.d;
    }
    
    public nc d()
    {
      return this.f;
    }
    
    public bc e()
    {
      return new q.0(this);
    }
    
    final class d_
      implements bc
    {
      d_() {}
      
      public void a(bb parambb, xb paramxb)
      {
        boolean bool = xb.r;
        int i = xb.q;
        q.b_.this.a = null;
        q.b_.this.b = null;
        a.f.o localo = paramxb.m();
        if (!h.b(localo)) {
          return;
        }
        h localh = new h(localo);
        q.b_.this.a = localh;
        w localw = localo.v();
        do
        {
          if (!localw.e()) {
            break;
          }
          e locale1 = localw.d();
          localObject = paramxb.d(locale1);
          if (!bool)
          {
            if (i != 0) {
              break label187;
            }
            if (bool) {}
          }
          else if (localh.e(locale1))
          {
            ((xb.a_)localObject).b(true);
          }
          if (localh.b(locale1) != localh.d()) {
            ((xb.a_)localObject).a(paramxb.a(localh.b(locale1)));
          }
          localw.f();
        } while (i == 0);
        if (!bool) {
          q.b_.this.b = localh.d(localh.d());
        }
        label187:
        double d1 = parambb.j() * 0.5D + parambb.i() * 0.5D;
        Object localObject = q.b_.this.b.g();
        label633:
        label635:
        do
        {
          if (localObject == null) {
            break;
          }
          double d12;
          xb.a_ locala_;
          do
          {
            e locale2 = (e)((v)localObject).c();
            if ((!bool) && ((!localh.e(locale2)) || (paramxb.a(locale2).v()))) {
              break;
            }
            double d2 = 0.0D;
            a.c.bb localbb = localh.c(locale2);
            double d3 = 1.7976931348623157E+308D;
            double d4 = 1.7976931348623157E+308D;
            double d5 = 1.7976931348623157E+308D;
            double d6 = -1.797693134862316E+308D;
            double d7 = -1.797693134862316E+308D;
            double d8 = -1.797693134862316E+308D;
            v localv = localbb.f();
            do
            {
              if (localv == null) {
                break;
              }
              e locale3 = (e)localv.c();
              cb localcb = paramxb.a(locale3);
              double d11 = localcb.l();
              d2 += d11 * d11 * 3.0D;
              d12 = localcb.b();
              double d13 = localcb.c();
              double d14 = localcb.d();
              double d15 = localcb.l();
              d3 = Math.min(d3, d12 - d15);
              d6 = Math.max(d6, d12 + d15);
              d4 = Math.min(d4, d13 - d15);
              d7 = Math.max(d7, d13 + d15);
              d5 = Math.min(d5, d14 - d15);
              d8 = Math.max(d8, d14 + d15);
              localv = localv.a();
              if (bool) {
                break label635;
              }
              if (i != 0) {
                break label633;
              }
            } while (i == 0);
            double d9 = d2 / (localbb.size() + 1);
            d9 = Math.sqrt(d9) + d1 * 0.9D;
            d9 *= d9;
            double d10 = Math.sqrt(d9 * localbb.size()) * 0.5D + d1;
            locala_ = paramxb.d(locale2);
            locala_.g(d10 * 0.9D);
            d12 = (d6 - d3) / 2.0D;
            d12 = Math.max(d12, (d7 - d4) / 2.0D);
            d12 = Math.max(d12, (d8 - d5) / 2.0D);
            d12 = Math.max(50.0D, d12);
          } while (bool);
          locala_.h(d12);
          localObject = ((v)localObject).b();
        } while (i == 0);
      }
    }
    
    final class c_
      implements bc
    {
      c_() {}
      
      public void a(bb parambb, xb paramxb)
      {
        boolean bool = xb.r;
        int i = xb.q;
        h localh = q.b_.this.a;
        if (localh != null)
        {
          v localv = q.b_.this.b.g();
          label369:
          label371:
          do
          {
            if (localv == null) {
              break;
            }
            Object localObject;
            double d7;
            do
            {
              e locale1 = (e)localv.c();
              if ((!bool) && ((!localh.e(locale1)) || (paramxb.a(locale1).v()))) {
                break;
              }
              a.c.bb localbb = localh.c(locale1);
              double d1 = 1.7976931348623157E+308D;
              double d2 = 1.7976931348623157E+308D;
              double d3 = 1.7976931348623157E+308D;
              double d4 = -1.797693134862316E+308D;
              double d5 = -1.797693134862316E+308D;
              double d6 = -1.797693134862316E+308D;
              localObject = localbb.f();
              do
              {
                if (localObject == null) {
                  break;
                }
                e locale2 = (e)((v)localObject).c();
                cb localcb = paramxb.a(locale2);
                double d8 = localcb.b();
                double d9 = localcb.c();
                double d10 = localcb.d();
                double d11 = localcb.l();
                d1 = Math.min(d1, d8 - d11);
                d4 = Math.max(d4, d8 + d11);
                d2 = Math.min(d2, d9 - d11);
                d5 = Math.max(d5, d9 + d11);
                d3 = Math.min(d3, d10 - d11);
                d6 = Math.max(d6, d10 + d11);
                localObject = ((v)localObject).a();
                if (bool) {
                  break label371;
                }
                if (i != 0) {
                  break label369;
                }
              } while (i == 0);
              localObject = paramxb.d(locale1);
              d7 = (d4 - d1) / 2.0D;
              d7 = Math.max(d7, (d5 - d2) / 2.0D);
              d7 = Math.max(d7, (d6 - d3) / 2.0D);
              d7 = Math.max(50.0D, d7);
            } while (bool);
            ((xb.a_)localObject).h(((xb.a_)localObject).l() * 0.4D + d7 * 0.6D);
            localv = localv.b();
          } while (i == 0);
        }
      }
    }
    
    final class a_
      implements nc
    {
      a_() {}
      
      public y a(cb paramcb, bb parambb, f paramf)
      {
        boolean bool = xb.r;
        int j = xb.q;
        h localh = q.b_.this.a;
        e locale1 = paramcb.p();
        if (((bool) || (localh != null)) && (localh.e(locale1)))
        {
          y localy1 = paramcb.a();
          lb locallb = parambb.d();
          double d1 = paramcb.l();
          v localv = localh.c(locale1).f();
          label307:
          do
          {
            if (localv == null) {
              break;
            }
            e locale2 = (e)localv.c();
            cb localcb = locallb.a(locale2);
            y localy2 = localcb.a();
            double d2 = localy2.d() - localy1.d();
            double d3 = localy2.f() - localy1.f();
            double d4 = localy2.g() - localy1.g();
            double d5 = Math.sqrt(d2 * d2 + d3 * d3 + d4 * d4);
            if ((bool) || (d5 >= 0.001D))
            {
              int i = 1;
              if (!bool) {
                if (d1 == 0.0D) {
                  d1 = 0.001D;
                }
              }
              switch (i)
              {
              case 1: 
                d6 = 1.0D / d1;
                if (!bool) {
                  if (j == 0) {
                    break label307;
                  }
                }
              case 2: 
                if (!bool)
                {
                  d6 = d5 / (d1 * d1);
                  if (j == 0) {
                    break label307;
                  }
                }
                break;
              }
              double d6 = k.a(d5 / d1, i) / d5;
              paramf.a(d2 * d6, d3 * d6, d4 * d6);
            }
            localv = localv.a();
          } while (j == 0);
        }
        return paramf;
      }
    }
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.g.a.q
 * JD-Core Version:    0.7.0.1
 */